home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / backup / dds2tar-.000 / dds2tar-2.4.12.tar / dds2tar-2.4.12 / dds2tar-test.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1996-03-29  |  2KB  |  79 lines

  1. #!/bin/sh
  2.  
  3. echo 'dds2tar-test >' make
  4. make
  5.  
  6. echo 'dds2tar-test >' make of?
  7. if test ! -x ./dds2tar ; then exit 1 ; fi
  8.  
  9. echo 'dds2tar-test >' creating soft links
  10. ln -sf ./dds2tar ./dds2index
  11. ln -sf ./dds2tar ./mt-dds
  12.  
  13. echo 'dds2tar-test >' tar c .
  14. tar c .
  15.  
  16. echo 'dds2tar-test >' tar -c --label dds2tar . ...
  17. tar --label dds2tar --record-file index-of-tar -R -v -c -b 32 .
  18.  
  19. I=`grep 'number of the file' index-of-tar | cut -c 38-43`
  20. I=`expr $I - 1`
  21. echo file number of the archive written is $I
  22. if test "$I" = "" ; then exit 1 ; fi
  23.  
  24. echo 'dds2tar-test >' tar -c . ...
  25. tar --record-file index-of-tar-v -v -R -v -c -b 32 .
  26.  
  27. echo 'dds2tar-test >' mt rewind \; mt fsf $I
  28. mt rewind ; mt fsf $I
  29.  
  30. echo 'dds2tar-test >' mt-dds tell
  31. ./mt-dds tell
  32.  
  33. echo 'dds2tar-test >' mt-dds label
  34. ./mt-dds label
  35.  
  36. echo 'dds2tar-test >' mt-dds
  37. ./mt-dds
  38.  
  39. echo 'dds2tar-test >' dds2index
  40. ./dds2index -t index-of-dds2index
  41.  
  42. echo 'dds2tar-test >' find '*tape*' using index-of-tar
  43. ./dds2tar -t index-of-tar '*tape*' | tar fvt -
  44.  
  45. echo 'dds2tar-test >' find '*tape*' using index-of-tar-v
  46. ./dds2tar -t index-of-tar-v '*tape*' | tar fvt -
  47.  
  48. echo 'dds2tar-test >' find '*tape*' using index-of-dds2index
  49. ./dds2tar -t index-of-dds2index '*tape*' | tar vft -
  50.  
  51. echo 'dds2tar-test >' dds2tar -t index-of-tar --body Changes '|wc -c'
  52. ./dds2tar -t index-of-tar --body Changes | wc -c
  53. ls -l Changes
  54.  
  55. if test $I -eq 0 ; then
  56.     echo 'dds2tar-test >' mt rewind
  57.     mt rewind
  58. else
  59.     echo 'dds2tar-test >' mt rewind \; mt fsf $I
  60.     mt rewind ; mt fsf $I
  61. fi
  62.  
  63. echo 'dds2tar-test > mt-dds tell >'index-of-tar-t
  64. mt-dds tell >index-of-tar-t
  65. echo 'dds2tar-test > tar tR >>' index-of-tar-t
  66. tar tR >> index-of-tar-t
  67. echo 'dds2tar-test >' grep -v "'loc        '" '< index-of-tar-t > index-of-tar-t2'
  68. grep -v 'loc        ' < index-of-tar-t > index-of-tar-t2
  69. echo 'dds2tar-test >' find '*tape*' using index-of-tar-t2
  70. ./dds2tar -t index-of-tar-t2 '*tape*' | tar vft -
  71.  
  72. if test $I -eq 0 ; then
  73.     echo 'dds2tar-test >' mt rewind
  74.     mt rewind
  75. else
  76.     echo 'dds2tar-test >' mt rewind \; mt fsf $I
  77.     mt rewind ; mt fsf $I
  78. fi
  79.